﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace JiGBot.Classes
{
    class Client
    {
        [DllImport("User32.DLL")]
        public static extern int SendMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam);

        public void SendKey(string Message)
        {
            foreach (char c in Message)
            {
                int charValue = c;
                IntPtr val = new IntPtr((Int32)c);
                SendMessage(Util.Handle, Constants.WM_CHAR, val, new IntPtr(0));
            }
            IntPtr rtn = new IntPtr((Int32)'\0');
            SendMessage(Util.Handle, Constants.WM_CHAR, rtn, new IntPtr(0));
        }


    }
}
